#coding:utf-8

class PaperRegisterDomain

  def self.all
    PaperRegisterRepo.all.map(&:employee_id).uniq.map do |eid|
      PaperRegisterRepo.group(eid)
    end
  end
  

  def self.create params
    record = PaperRegisterRepo.create(params)
    record.check_expire; record.save
    PaperRegisterRepo.group(record.employee_id)
  end
end
